package cate.game.role.pvp.throne.msg;

import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBTB;
import cate.game.pvp.throne.dto.TBGroupDataDTO;
import easy.java.dev.note.NoteField;

@ClientMsg(title = "分组赛数据 の 请求")
public class TBKoDivideReq implements MsgInput {

    @NoteField("等级组")
    public int group;

    @Override
    public void execute(GameBody game, ClientContext cc) {
        TBGroupDataDTO groupData = game.pvp.throne.data.holder.groupMap.get(group);
        cc.getRole().sendNow(new TBKoDivideResp(group, groupData.ko.divide.matchs));
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBTB.KO_DIVIDE_REQ;
    }
}
